﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/MasterPage.Master" AutoEventWireup="true" CodeBehind="ViewStakeholderPlanning.aspx.cs" Inherits="DrivingCRM.Views.Private.CRM.ViewStakeholderPlanning" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="banniere" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="nav" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contenu" runat="server">
    <h2>Planning d'un intervenant</h2>

    Intervenant:
    <asp:DropDownList ID="DDL_Stakeholder" runat="server" AutoPostBack="True" 
        DataSourceID="DS_Stakeholders" DataTextField="CompleteName" DataValueField="Id">
    </asp:DropDownList>
    <asp:EntityDataSource ID="DS_Stakeholders" runat="server" 
        ConnectionString="name=Model_DrivingCRMContainer" 
        DefaultContainerName="Model_DrivingCRMContainer" EnableFlattening="False" 
        EntitySetName="UserSet" EntityTypeFilter="Stakeholder">
    </asp:EntityDataSource>

    <telerik:radscheduler ID="RS_Events" runat="server" 
        DataEndField="EndDateWithHour" DataKeyField="IdEvent" 
        DataSourceID="DS_Events" DataStartField="DateWithHour" DataSubjectField="Type" 
        DataDescriptionField="Stakeholder.CompleteName"
        Height="" DayEndTime="20:00:00" SelectedView="WeekView" AllowEdit="false" 
        AllowInsert="false" AllowDelete="false"
        AdvancedForm-Enabled="false">

        <AppointmentTemplate>
            <div class="rsCustomAppointmentContainer <%# Eval("Subject") %>">
                
                    <asp:Label ID="Label1" Text='<%# Eval("Subject") %>' Font-Size="10" Font-Bold="true" runat="server" />
                    <%--<%# Eval("Name") %>--%>
                    <br /><br />
                <div>
                    <asp:Label ID="Label2" Text='<%# Eval("Description") %>' Font-Size="10" runat="server" />
                    <%--<%# Eval("Stakeholder.Firstname") %>--%>
                </div>
            </div>
        </AppointmentTemplate>
    </telerik:radscheduler>
    <asp:EntityDataSource ID="DS_Events" runat="server" 
        ConnectionString="name=Model_DrivingCRMContainer" 
        DefaultContainerName="Model_DrivingCRMContainer" EnableDelete="True" 
        EnableFlattening="False" 
        EntitySetName="EventSet" EntityTypeFilter="Event" Include="Stakeholder,Agency"
        Where="it.StakeholderId == @IdStakeholder">
        <WhereParameters>
            <asp:ControlParameter ControlID="DDL_Stakeholder" DbType="Guid" Name="IdStakeholder" PropertyName="Selectedvalue" />
        </WhereParameters>
    </asp:EntityDataSource>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="footer" runat="server">
</asp:Content>
